#include "stdafx.h"
#include "Base/ErrorCode.h"

#define TO_STR(n) TO_STR_(n)
#define TO_STR_(n) #n

void Error( const char* const functionName, const char* const message, const int line, const char* const fileName ) {
	OutputDebugString( "********************************************************\n" );
	OutputDebugString( "File: " ); OutputDebugString( fileName ); OutputDebugString( "\n" );
	OutputDebugString( "Line: " ); OutputDebugString( TO_STR( line ) ); OutputDebugString( "\n" );
	OutputDebugString( "Errorfunction: " ); OutputDebugString( functionName ); OutputDebugString( "\n" );
	OutputDebugString( "message: " ); OutputDebugString( message );
	OutputDebugString( "********************************************************\n" );
	assert( !message );
}

void Warning( const char* const functionName, const char* const message, const int line, const char* const fileName ) {
	OutputDebugString( "********************************************************\n" );
	OutputDebugString( "File: " ); OutputDebugString( fileName ); OutputDebugString( "\n" );
	OutputDebugString( "Line: " ); OutputDebugString( TO_STR( line ) ); OutputDebugString( "\n" );
	OutputDebugString( "Warningfunction: " ); OutputDebugString( functionName ); OutputDebugString( "\n" );
	OutputDebugString( "message: " ); OutputDebugString( message );
	OutputDebugString( "********************************************************\n" );
}
